var App = require('app');

App.Router.map(function() {
	this.resource('index', { path: '/'});
	this.resource('user', { path: '/user' }, function() {		
		this.route('signup', { path: '/signup' });
		this.route('signon', { path: '/signon' });
		this.route('signout', { path: '/signout' });
    });
	
	this.resource('apps', { path: '/apps' }, function() {		
		this.route('new');	
    });
	this.resource('app', { path: '/app/:app_id' }, function() {
		this.route('edit');
		this.route('run');
		
		this.resource('forms', function() {
			this.route('new');
	    });
		this.resource('form', { path: '/form/:form_id' }, function() {	
			this.route('view');
			this.route('edit');
			this.route('data');
			this.route('report'); 
	    });
    });
});
